#ifndef FIFO_PROCESS_H
#define FIFO_PROCESS_H
#include "cn_fifo.h"
#include "stdint.h"
#define    CMD_SIZE           	(5 * 1024)      //max cmd length
#define FIFO_RECV_WLAN_BUF_SIZE  (10 * 1024)      //define fifo buf size
#define FIFO_RCB_USART_BUF_SIZE   (10 * 1024)      //define fifo buf size

/*******************************定义数据结构**********************************/
#pragma pack(1)
struct process_data
{
    uint16_t len;                 //sendBuf处理数据长度 
    uint8_t flag;                //处理标志
    uint8_t con;                 //处理条件
    uint8_t mean;                //条件描述
//    u8 level;               //消息等级
    uint8_t data[CMD_SIZE];           //要处理的实际数据内容
    uint8_t (*process_msg)(uint8_t *buf, uint32_t len);
    uint32_t(*get_msg)(uint8_t *cmdBuf, struct fifo_data *fifo);
};
#pragma pack()
typedef enum
{
    NORMAL = 0,             //正常模式
    MANY_P = 1,             //多次处理
}CMDcon_t;


extern struct fifo_data rcv_wlan_fifo;	//收到USB的数据FIFO
extern struct fifo_data rcv_usart_fifo;	//收到的SPI的数据FIFO

void CMDProcessInit(void);
void process_recv_wlan_fifo_task(void);
void process_rcv_usart_fifo_task(void);
void CreateWlanFifoTask(void);
#endif



